//
//  RootViewController.m
//  AttributeString
//
//  Created by 何欣 on 15/12/18.
//  Copyright © 2015年 何欣. All rights reserved.
//

#import "RootViewController.h"

@interface RootViewController ()<UITextViewDelegate>


@property (nonatomic,retain)UILabel *label1;
@property (nonatomic,retain)UILabel *label2;
@property (nonatomic,retain)UILabel *label3;

@property (nonatomic,copy)NSString *textStr;

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.label1 = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 375, 100)];
   
    [self.view addSubview:self.label1];

    
    
    self.label2 = [[UILabel alloc]initWithFrame:CGRectMake(0, 200, 375, 100)];
   
    [self.view addSubview:self.label2];

    
    self.label3 = [[UILabel alloc]initWithFrame:CGRectMake(0, 400, 375, 100)];
 

    [self.view addSubview:self.label3];
    
    
    _textStr = @"Hello world";
    
  
    
#pragma mark- 方式一:
    
    //首先初始化一个NSMutableAttributedString，然后向里面添加文字样式，最后将它赋给控件的AttributedText，该方法适合于文本较少而又需要分段精细控制的情况。
    
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:self.textStr];
    //给所有的字符设置字体Zapfino 字体高度为15像素
//    attributedString addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"" size:<#(CGFloat)#>] range:<#(NSRange)#>
    
    
    
    
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
